package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.CardsState;
import com.stlm2.dems.entity.CardsType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Author：fuchunyu
 * Date：2017/10/13
 * Description：
 */
public class BaseUserCards {
    private Integer id;
    private Integer userId;
    private Integer cardsId;
    private Date getTime;
    private Date usedTime;
    private CardsState cardsState;
    private Integer orderId;
    private Date endUseTime;
    private String name;
    private CardsType cardsType;
    private BigDecimal money;
    private Integer validDay;
    private Integer goodsId;
    private Integer goodsCategoryId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CardsType getCardsType() {
        return cardsType;
    }

    public void setCardsType(CardsType cardsType) {
        this.cardsType = cardsType;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getValidDay() {
        return validDay;
    }

    public void setValidDay(Integer validDay) {
        this.validDay = validDay;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getGoodsCategoryId() {
        return goodsCategoryId;
    }

    public void setGoodsCategoryId(Integer goodsCategoryId) {
        this.goodsCategoryId = goodsCategoryId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCardsId() {
        return cardsId;
    }

    public void setCardsId(Integer cardsId) {
        this.cardsId = cardsId;
    }

    public Date getGetTime() {
        return getTime;
    }

    public void setGetTime(Date getTime) {
        this.getTime = getTime;
    }

    public Date getUsedTime() {
        return usedTime;
    }

    public void setUsedTime(Date usedTime) {
        this.usedTime = usedTime;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Date getEndUseTime() {
        return endUseTime;
    }

    public void setEndUseTime(Date endUseTime) {
        this.endUseTime = endUseTime;
    }

    public CardsState getCardsState() {
        return cardsState;
    }

    public void setCardsState(CardsState cardsState) {
        this.cardsState = cardsState;
    }

    public Integer getCardsStateValue(){
        return (cardsState != null) ? cardsState.getIntValue() : null;
    }
    public void setCardsStateValue(Integer cardstate){
        if(cardstate != null)
            cardsState = CardsState.getByIntValue(cardstate);
    }
    public Integer getCardsTypeValue() {
        return (cardsType != null) ? cardsType.getIntValue() : null;
    }

    public void setCardsTypeValue(Integer cardType) {
        if(cardType != null)
            cardsType = CardsType.getByIntValue(cardType);
    }
}
